//
//全局消息注册与发送，用事件机制完成
//
package eventUtil
{
	
	import laya.events.EventDispatcher;
	
	/**客户端内部事件的派发和接受用这个*/
	public class EventCenter extends EventDispatcher 
	{
		public static const LOGIN_SUCESS:String = "LOGIN_SUCESS";
		
		

		public static const BROWER_WINDOW_RESIZE:String = "BROWER_WINDOW_RESIZE";//浏览器窗口大小改变

		
		public static const PAUSE_SCROLL_VIEW:String = "PAUSE_SCROLL_VIEW";//暂停滚动


		public static const OPEN_PANEL_VIEW:String = "OPEN_PANEL_VIEW";//打开界面消息
		public static const COMMON_CLOSE_PANEL_VIEW:String = "COMMON_CLOSE_PANEL_VIEW";//关闭界面消息

		public static const CLOSE_PANEL_VIEW:String = "CLOSE_PANEL_VIEW";//关闭界面消息
		
		public static const OPEN_BOOK_PAGE:String = "OPEN_BOOK_PAGE";//打开书本某一页

		public static const DELETE_RECITE_WORD:String = "DELETE_RECITE_WORD";//删除单词
		public static const SHOW_TRANSLATE_TEXT:String = "SHOW_TRANSLATE_TEXT";//显示翻译

		public static const SHOW_CONTENT_PANEL:String = "SHOW_CONTENT_PANEL";//修改

		public static const UPDATE_USER_CART_NUM:String = "UPDATE_USER_CART_NUM";//

		public static const SELECTE_USERCART_GOODS:String = "SELECTE_USERCART_GOODS";//选择购物车商品
		public static const UPDATE_USERCART_GOODS_COUNT:String = "UPDATE_USERCART_GOODS_COUNT";//更新购物车某个商品的数量

		private static var _eventCenter:EventCenter;
		
	

		public static function get instance():EventCenter
		{
			if(_eventCenter == null)
			{
				_eventCenter = new EventCenter(new SingleForcer());
			}
			
			return _eventCenter;
		}
		
		public function EventCenter(force:SingleForcer)
		{
			
		}
		
	}
}

class SingleForcer{}
